As a brief introduction to the Modulation Transfer Function (MTF), this function is a metric used to measure the sharpness and contrast of an image.
Sharpness and contrast have a direct relationship with the resolution of an image. The higher the MTF, the sharper and more contrasted the image will be, hence a better resolution, and the same goes with a higher resolution.
The MTF is a function of the spatial frequency of the image. The spatial frequency is the number of cycles per unit distance. In the case of the MTF, the unit distance is the distance between pixels.
To get more technical, there are many factors that affect the MTF of an image. The most important factors are the lens and the sensor (there are many more factors that contribute to MTF as a whole).
For a short understanding on how MTF is calculated we can use the following image to the left. In the image to the left we have black and white bars with different levels of blurring (contrast/sharpness).
So, at the bottom of the image, graphed in blue is the edge response. This measures the intensity of the light white would be max intensity 255 for RGB Color Filter Array (CFA) and black would be 0 intensity (in perfect conditions).
We have to take in consideration the distance between pixels in the array from white to black. We use these values to calculate the MTF. We calculate the derivative of an edge to get the Line Spread Function (LSF) which
then we take the Fourier Transform of the LSF to get the MTF. The MTF is a function of the spatial frequency of the image. The spatial frequency is the number of cycles per unit distance. In the case of the MTF, the unit distance is the distance between pixels.